#pragma once
#ifndef _KH_ENGINE_PLAYER_H
#define _KH_ENGINE_PLAYER_H
#include <Kharlia/Engine/Common.h>
#include <Kharlia/Engine/Net.h>

namespace kharlia { namespace engine {

class APlayerController;

class KH_ENGINE_DECLSPEC CPlayer: public core::CObject {
    bool mIsLocal;
    shared_ptr<APlayerController> mController;
    rn::Connection_RM3* mRMConnection;
    rn::RakNetGUID mGUID;
    rn::SystemAddress mAddress;

    KH_DECL_GC()

public:
    CPlayer(PyObject* self, bool isLocal=false);
    virtual ~CPlayer();

    KH_DEF_GET(bool, IsLocal)
    KH_DEF_GETSET(const shared_ptr<APlayerController>&, Controller)
    KH_DEF_GETSET(rn::Connection_RM3*, RMConnection)
    KH_DEF_GETSET(rn::RakNetGUID, GUID)
    KH_DEF_GETSET(rn::SystemAddress, Address)

    friend void _InitPlayerClasses();
};

}} // namespace Kharlia

KH_HAS_BACK_REFERENCE(kharlia::engine::CPlayer)

#endif // _KH_ENGINE_PLAYER_H